Skip to content

Conversation

@atscott
Copy link
Contributor

@atscott atscott commented Dec 15, 2025

This commit omits the initialization of the taskState when the constructor executes outside the proxy zone. This would generally indicate that either zone.js/dist/zone-testing.js was not included or it does not include patches for the test framework being used (e.g. Vitest). In this case, we should simply omit the initialization of task state tracking, meaning that waitForTasksOutsideAngular will "not work" and simply be a Promise.resolve.

fixes #32542

This commit omits the initialization of the `taskState` when the
constructor executes outside the proxy zone. This would generally
indicate that either `zone.js/dist/zone-testing.js` was not included
_or_ it does not include patches for the test framework being used
(e.g. Vitest). In this case, we should simply omit the initialization of
task state tracking, meaning that `waitForTasksOutsideAngular` will "not
work" and simply be a `Promise.resolve`.

fixes angular#32542
@andrewseguin andrewseguin added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels Dec 17, 2025
@andrewseguin andrewseguin merged commit dd40f25 into angular:main Dec 17, 2025
31 of 33 checks passed
@andrewseguin
Copy link
Contributor

This PR was merged into the repository. The changes were merged into the following branches:

andrewseguin pushed a commit that referenced this pull request Dec 17, 2025
…32544)

This commit omits the initialization of the `taskState` when the
constructor executes outside the proxy zone. This would generally
indicate that either `zone.js/dist/zone-testing.js` was not included
_or_ it does not include patches for the test framework being used
(e.g. Vitest). In this case, we should simply omit the initialization of
task state tracking, meaning that `waitForTasksOutsideAngular` will "not
work" and simply be a `Promise.resolve`.

fixes #32542

(cherry picked from commit dd40f25)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jan 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: cdk/testing target: patch This PR is targeted for the next patch release

Projects

None yet

3 participants